* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #f0e6ff 50%, #e6f3ff 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 欢迎页样式 */
.welcome-container {
    text-align: center;
    max-width: 400px;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.star-animation {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.star {
    font-size: 2rem;
    animation: twinkle 2s infinite alternate;
}

.star:nth-child(2) {
    animation-delay: 0.5s;
}

.star:nth-child(3) {
    animation-delay: 1s;
}

@keyframes twinkle {
    0% { transform: scale(1) rotate(0deg); opacity: 0.7; }
    100% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

.subtitle {
    color: #666;
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* 按钮样式 */
.cute-button {
    background: linear-gradient(45deg, #ff9a9e, #fecfef, #fecfef);
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 154, 158, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cute-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 154, 158, 0.6);
}

.cute-button:active {
    transform: translateY(0);
}

/* 问题页样式 */
#question-page {
    justify-content: flex-start;
    padding-top: 60px;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff9a9e, #fecfef);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 12.5%;
}

.question-container {
    max-width: 400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.question-number {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 30px;
    line-height: 1.6;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    padding: 20px;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    line-height: 1.4;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.option-a {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

.option-b {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.3);
}

.option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 结果页样式 */
#result-page {
    justify-content: flex-start;
    padding-top: 40px;
}

.result-container {
    max-width: 400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-title {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 20px;
}

.mbti-result {
    margin-bottom: 30px;
}

.mbti-type {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.mbti-title {
    font-size: 1.2rem;
    color: #555;
    font-weight: 500;
}

.character-image {
    margin: 30px 0;
}

.character-emoji {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.fortune-section {
    margin: 30px 0;
}

.fortune-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ffeef8, #f0e6ff);
    border-radius: 15px;
}

.fortune-label {
    font-weight: 500;
    color: #555;
}

.fortune-stars {
    font-size: 1.2rem;
}

.fortune-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fortune-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.tip-section {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e6f3ff, #ffeef8);
    border-radius: 15px;
    border-left: 4px solid #ff9a9e;
}

.tip-title {
    font-weight: 500;
    color: #555;
    margin-bottom: 10px;
}

.tip-content {
    color: #666;
    line-height: 1.5;
    font-size: 0.95rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.share-btn, .restart-btn {
    flex: 1;
    font-size: 0.95rem;
    padding: 12px 20px;
}

.restart-btn {
    background: linear-gradient(45deg, #a8edea, #fed6e3);
    box-shadow: 0 5px 15px rgba(168, 237, 234, 0.4);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.share-image {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #ffeef8, #f0e6ff);
    border-radius: 15px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .page {
        padding: 15px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .welcome-container,
    .question-container,
    .result-container {
        padding: 20px;
    }
}